message("== Start Build message:")
message("Parse protoc to message.")
find_package(Protobuf REQUIRED)
file(GLOB PROTO_FILES RELATIVE  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/protos/*.proto)
foreach(PROTO_FILE ${PROTO_FILES})
    message(${PROTO_FILE})
endforeach()
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
message("Parse Finished.")

message("Build Message lib.")
add_library(message ${SRC_DEF} ${PROTO_SRCS} ${PROTO_HDRS})
target_include_directories(message PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(message PUBLIC ${Protobuf_LIBRARIES})